package 集合框架.TreeSet源码解析;

import java.util.Map;
import java.util.TreeMap;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2022-02-16 21:27
 **/
public class TestTreeMap {
    public static void main(String[] args) {
        Map<String, Integer> treeMap = new TreeMap<>();
        treeMap.put("a", 3);
        treeMap.put("c", 2);
        treeMap.put("b", 5);
        treeMap.put(null,5);
        treeMap.forEach((k, v) -> {
            System.out.println(k + ":" + v);
        });
    }
}
